//在屏幕上列出命令行中的所有文件
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
	int byte;
	FILE* source;
	errno_t err;
	int filect;
	if (argc == 1)
	{
		printf("Usage: %s filename[s]\n", argv[0]);
		exit(EXIT_FAILURE);
	}

	for (filect = 1; filect < argc; filect++)
	{
		if ((err = fopen_s(&source,argv[filect], "r+"))!=0)
		{
			printf("Could not open file %s for input\n", argv[filect]);
			continue;
		}
		while ((byte = getc(source)) != EOF)
		{
			putchar(byte);
		}
		if (fclose(source) != 0)
			printf("Could not close file %s\n", argv[1]);
	}

	return 0;
}